<template>
  <div class="app-container">
    <div style="display: flex">
      <div style="width: 25%">
        <Find :OriginalFilter="{ static: true }" @Launchform="Launchform5" :formList="formList" />
      </div>

      <div style="margin-top: 20px">
        <Find :OriginalFilter="{ static: true }" @Launchform="Launchform6" @findClicked="findClicked" :searchImg="false" :formList="formList1" />
      </div>
    </div>

    <el-card style="margin-top: 15px" shadow="never" :body-style="{ padding: '5px' }">
      <div style="display: flex">
        <div style="width: 25%">
          <div>
            <span style="font-weight: 600">选择型体</span>
          </div>
          <Table @currentRow="clicktogetdata1" :isLoading="isLoading1" :tableHeader="tableHeader" :tableData="SelectTypeQueryTableDate" />
          <PageModule
            :PageData="{ pageSizeShow: true, buttonS: true, total: totalL }"
            :layout="'prev, pager'"
            @pageChange="pageChangeL"
            @pageSizeChange="pageSizeChangeL"
          />
        </div>

        <div style="width: 25%; margin-left: 25px">
          <div>
            <span style="font-weight: 600">选择颜色</span>
          </div>
          <Table selection @currentRow="clicktogetdata2" :isLoading="isLoading2" :tableHeader="tableHeader2" :tableData="SelectColorQueryTableDate" />
        </div>

        <div style="width: 40%; margin-left: 25px">
          <div>
            <span style="font-weight: 600">针车工序明细</span>
            <el-button style="margin-left: 15px" type="primary" size="default" @click="handleCloseMateriaLKlc as any">删除工序明细</el-button>
            <el-button style="margin-left: 15px" type="primary" size="default" @click="handleCloseMateriaLKlc15 as any">新增数据</el-button>
            <el-button style="margin-left: 15px" type="primary" size="default" @click="SaveChangesMethods as any">保存修改数据</el-button>
          </div>
          <Table
            @selectList="selectList1"
            :summaryData="summaryData1"
            summary
            :isLoading="isLoading3"
            :tableHeader="tableHeader3"
            :tableData="NeedleOperationDetailsTableDate"
            selection
          />
        </div>
      </div>
    </el-card>

    <el-dialog v-model="dialogVisible10" width="50%">
      <Find :OriginalFilter="{ static: true }" @Launchform="Launchform7" :formList="formList11" />
      <Table :isLoading="isLoading8" :tableHeader="tableHeader10" :tableData="UnguidedBodyColorQueryTableDate" :TableHeight="50" />
      <PageModule
        :PageData="{ pageSizeShow: true, buttonS: true, total }"
        :layout="'prev, pager'"
        @pageChange="pageChange"
        @pageSizeChange="pageSizeChange"
      />
    </el-dialog>

    <el-dialog v-model="dialogVisible1" width="30%">
      <Find :searchImg="false" :OriginalFilter="{ static: true }" @Launchform="Launchform7" :formList="formList11" />
      <p style="color: blue; margin-top: 15px">把以上型体/颜色工序资料复制给以下打勾型体颜色</p>
      <Find :searchImg="false" :OriginalFilter="{ static: true }" @Launchform="Launchform9" :formList="formList12" />
      <Table @selectList="selectList" selection :tableHeader="tableHeader11" :tableData="tableData" :TableHeight="50" />
      <PageModule
        :PageData="{ pageSizeShow: true, buttonS: true, total: total1 }"
        :layout="'prev, pager'"
        @pageChange="pageChange1"
        @pageSizeChange="pageSizeChange1"
      />
      <el-button type="primary" size="default" @click="copyStyleQueryMethods">复制工序资料</el-button>
    </el-dialog>

    <!-- 打勾复制 -->
    <el-dialog v-model="dialogVisible13" width="30%">
      <p style="color: blue; margin-top: 15px">把打勾工序资料复制给以下打勾型体颜色</p>
      <Find :searchImg="false" :OriginalFilter="{ static: true }" @Launchform="Launchform8" :formList="formList12" />
      <Table @selectList="selectList" selection :tableHeader="tableHeader11" :tableData="tableData1" :TableHeight="50" />
      <PageModule
        :PageData="{ pageSizeShow: true, buttonS: true, total: total11 }"
        :layout="'prev, pager'"
        @pageChange="pageChange11"
        @pageSizeChange="pageSizeChange11"
      />
      <el-button type="primary" size="default" @click="copyStyleQueryMethods1">复制工序资料</el-button>
    </el-dialog>
  </div>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import SynchronizationLoginWork from '@/utils/SynchronizationLoginWork'
import JMessage from '@/utils/JMessage'
export default defineComponent({
  name: 'NeedleCarUnitPriceFile'
})
</script>
<script lang="ts" setup>
import { i18n, Jzhcn } from '@/i18n'
import { ref, onMounted, watch } from 'vue'
import {
  SaveChanges,
  deleteDeleteOperationName,
  copyStyleQuery1,
  copyStyle1,
  copyStyleQuery,
  copyStyle,
  SelectTypeQuery,
  SelectColorQuery,
  CounterCheck,
  NeedleOperationDetailsQuery,
  UnguidedBodyColorQuery,
  DeleteTheTypeColor,
  TheWholeBodyIsDeleted,
  LeadNeedleOperation
} from '@/api/Control/FactoryControl/NeedleCarUnitPriceFile'
// 保存修改
const SaveChangesParms = ref({
  color: '',
  items: [],
  style: ''
})

const SaveChangesMethods = async () => {
  SaveChangesParms.value.items = NeedleOperationDetailsTableDate.value
  try {
    const result = await SaveChanges(SaveChangesParms.value)
    if (result.code === 200) {
      NeedleOperationDetailsQueryMethods()
      JMessage.success(result.message)
    } else {
      JMessage.error(result.message)
    }
  } catch (error) {
    JMessage.error('保存修改失败')
  }
}

const handleCloseMateriaLKlc15 = () => {
  const lastItem = NeedleOperationDetailsTableDate.value[NeedleOperationDetailsTableDate.value.length - 1]
  const newSeqNo = lastItem ? lastItem.seqNo + 1 : 1 // 如果数组为空，则从1开始
  NeedleOperationDetailsTableDate.value.push({
    seqNo: newSeqNo,
    processName: '',
    price: '',
    remark: '',
    disableConfirm: true,
    change: 'Y'
  })
}

// 删除工序明细
const deleteDeleteOperationNameParms = ref({
  style: '',
  color: '',
  seqNos: []
})

const handleCloseMateriaLKlc = (_done?: () => void) => {
  if (deleteDeleteOperationNameParms.value.seqNos.length === 0) {
    JMessage.warning('请勾选需要删除的数据')
  } else {
    ElMessageBox.confirm('确认要删除数据吗?')
      .then(async () => {
        deleteDeleteOperationNameMethods()
      })
      .catch(() => {})
  }
}

const deleteDeleteOperationNameMethods = async () => {
  try {
    const result = await deleteDeleteOperationName(deleteDeleteOperationNameParms.value)
    if (result.code === 200) {
      NeedleOperationDetailsQueryMethods()
      JMessage.success(result.message)
    } else {
      JMessage.error(result.message)
    }
  } catch (error) {
    JMessage.error('删除失败')
  }
}

// 打勾工序复制
const dialogVisible13 = ref(false)

const copyStyleQueryMethods1 = async () => {
  if (copyStyleQueryParms.value.length === 0) {
    JMessage.warning('请勾选正确的数据')
  } else {
    try {
      const result = await copyStyleQuery1(copyStyle1List.value, tableDataParms.value, copyStyleQueryParms.value)
      if (result.code === 200) {
        dialogVisible13.value = false
        SelectTypeQueryMethods()
        JMessage.success(result.message)
      } else {
        JMessage.error(result.message)
      }
    } catch (error) {
      JMessage.error('复制出错请重试')
    }
  }
}

const copyStyle1List = ref([])

const selectList1 = (row: any) => {
  copyStyle1List.value = row.map((item: any) => {
    return item.seqNo
  })
  deleteDeleteOperationNameParms.value.seqNos = row.map((item: any) => {
    return item.seqNo
  })
}

const copyStyleParms1 = ref({
  companyId: '',
  exColor: '',
  exStyle: '',
  pageNum: 1,
  pageSize: 40,
  style: ''
})

const Launchform8 = (row: any) => {
  copyStyleParms1.value.style = row[0].inputValue
  copyStyleMethdos1()
}

const tableData1 = ref([])

const total11 = ref(0)

const pageChange11 = (val: any) => {
  copyStyleParms1.value.pageNum = val
  copyStyleMethdos1()
}

const pageSizeChange11 = (val: any) => {
  copyStyleParms1.value.pageSize = val
  copyStyleMethdos1()
}

const copyStyleMethdos1 = async () => {
  try {
    const result = await copyStyle1(copyStyleParms1.value)
    tableData1.value = result.list
    total11.value = result.total
  } catch (error) {
    JMessage.error('查询出错')
  }
}

// 复制型体
const copyStyleQueryParms = ref([])

const lotNoParms = ref({
  style: '',
  color: ''
})

const selectList = (row: any) => {
  copyStyleQueryParms.value = row.map((item: any) => {
    return item
  })
}

const copyStyleQueryMethods = async () => {
  if (copyStyleQueryParms.value.length === 0) {
    JMessage.warning('请勾选正确的数据')
  } else {
    try {
      const result = await copyStyleQuery(tableDataParms.value, copyStyleQueryParms.value)
      if (result.code === 200) {
        dialogVisible1.value = false
        SelectTypeQueryMethods()
        JMessage.success(result.message)
      } else {
        JMessage.error(result.message)
      }
    } catch (error) {
      JMessage.error('复制出错请重试')
    }
  }
}

// 复制型体工序查询
const dialogVisible1 = ref(false)

const dialogVisible10 = ref(false)

const copyStyleParms = ref({
  companyId: '',
  exColor: '',
  exStyle: '',
  pageNum: 1,
  pageSize: 40,
  style: ''
})

const Launchform9 = (row: any) => {
  copyStyleParms.value.style = row[0].inputValue
  copyStyleMethdos()
}

const tableData = ref([])

const total1 = ref(0)

const pageChange1 = (val: any) => {
  copyStyleParms.value.pageNum = val
  copyStyleMethdos()
}

const pageSizeChange1 = (val: any) => {
  copyStyleParms.value.pageSize = val
  copyStyleMethdos()
}

const copyStyleMethdos = async () => {
  try {
    const result = await copyStyle(copyStyleParms.value)
    tableData.value = result.list
    total1.value = result.total
  } catch (error) {
    JMessage.error('查询出错')
  }
}

const formList12 = ref([
  {
    type: 'input',
    inputPlaceholder: '请输入型体',
    inputValue: '',
    inputLabel: ''
  }
])

// 整个型体删除
const TheWholeBodyIsDeletedParms = ref('')

const PunchingUnitPriceFileStyle = ref('')

const summaryData1 = ref<any>([
  {
    index: 3,
    num: 0
  }
])

const styleL = ref('')
const colorL = ref('')

const Launchform6 = (row: any) => {
  styleL.value = row[0].inputValue
  // styleNoList1.value = row[0].inputValue

  colorL.value = row[1].inputValue
}

watch(styleL, (oldval, eldval) => {
  // SelectColorQueryMethods1()
})

const styleNoList1 = ref('')

// const SelectColorQueryMethods1 = async () => {
//   const result = await SelectColorQuery(styleNoList1.value)
//   formList1.value[1].selectOptions = EvaluatesTheArrayReturnValue(result.map((item:any) => {
//     return item.styleColor
//   }))
// }

const upload = () => {
  const fileType = ['xls', 'xlsx']

  const inputFile = document.createElement('input')

  const maxFileSizeMb = 2

  const maxFilesSizeBytes = maxFileSizeMb * 1024 * 1024

  inputFile.type = 'file'

  inputFile.style.display = 'none'

  document.body.appendChild(inputFile)

  inputFile.addEventListener('change', function () {
    const files = inputFile.files as any // 获取文件数组

    const file = files[0] // 获取第一个文件对象

    const fileExtension = file.name.split('.').pop()

    if (!fileType.includes(fileExtension as any)) {
      JMessage.warning('上传的文件格式只能是 xls, xlsx')
      document.body.removeChild(inputFile)
      return false
    }

    if (file.size > maxFilesSizeBytes) {
      JMessage.warning('文件大小不能超过2MB!!!')
      document.body.removeChild(inputFile)
      return
    }

    const formData = new FormData()

    formData.append('file', file) // 添加文件对象及文件名

    LeadNeedleOperationMethods(formData)
  })

  inputFile.click()
}

const TheWholeBodyIsDeletedMethods = async () => {
  const result = await TheWholeBodyIsDeleted(TheWholeBodyIsDeletedParms.value)
  if (result.code === 200) {
    SelectTypeQueryMethods()
    DeleteTheTypeColorParms.value.styleNo = ''
    JMessage.success(result.message)
  } else {
    JMessage.error(result.message)
  }
}

const handleCloseMateriaLKlc1 = () => {
  if (TheWholeBodyIsDeletedParms.value === '') {
    JMessage.warning('请选择需要删除的数据')
  } else {
    ElMessageBox.confirm('确认要删除数据吗?')
      .then(async () => {
        TheWholeBodyIsDeletedMethods()
      })
      .catch(() => {})
  }
}

// 删除型体颜色
const DeleteTheTypeColorParms = ref({
  cfmFlag: '',
  styleColor: '',
  styleNo: ''
})

const handleCloseMateriaLKlc7 = () => {
  if (DeleteTheTypeColorParms.value.styleNo === '') {
    JMessage.warning('请选择需要删除的数据')
  } else if (DeleteTheTypeColorParms.value.cfmFlag === 'Y') {
    JMessage.warning('已检核不可删除')
  } else {
    ElMessageBox.confirm('确认要删除数据吗?')
      .then(async () => {
        DeleteTheTypeColorMethods()
      })
      .catch(() => {})
  }
}

const DeleteTheTypeColorMethods = async () => {
  const result = await DeleteTheTypeColor(DeleteTheTypeColorParms.value)
  if (result.code === 200) {
    SelectColorQueryMethods()
    DeleteTheTypeColorParms.value.styleNo = ''
    JMessage.success(result.message)
  } else {
    JMessage.error(result.message)
  }
}

// 未导出型体颜色查询
const UnguidedBodyColorQueryParms = ref({
  color: '',
  cutTool: '',
  pageNum: 1,
  pageSize: 40,
  styleNo: ''
})

const Launchform7 = (row: any) => {
  UnguidedBodyColorQueryParms.value.styleNo = row[0].inputValue
  UnguidedBodyColorQueryParms.value.color = row[2].inputValue
  UnguidedBodyColorQueryParms.value.cutTool = row[1].inputValue
  UnguidedBodyColorQueryMethods()
}

const isLoading8 = ref(true)

const UnguidedBodyColorQueryTableDate = ref([])

const total = ref(0)

const pageChange = (val: any) => {
  UnguidedBodyColorQueryParms.value.pageNum = val
  UnguidedBodyColorQueryMethods()
}

const pageSizeChange = (val: any) => {
  UnguidedBodyColorQueryParms.value.pageSize = val
  UnguidedBodyColorQueryMethods()
}

const UnguidedBodyColorQueryMethods = async () => {
  isLoading8.value = true
  const result = await UnguidedBodyColorQuery(UnguidedBodyColorQueryParms.value)
  UnguidedBodyColorQueryTableDate.value = result.list
  total.value = result.total
  isLoading8.value = false
}

// 针车工序查询
const NeedleOperationDetailsQueryParms = ref({
  cfmFlag: '',
  styleColor: '',
  styleNo: ''
})

const isLoading3 = ref(true)

const NeedleOperationDetailsTableDate = ref<any>([])

const NeedleOperationDetailsQueryMethods = async () => {
  isLoading3.value = true
  const result = await NeedleOperationDetailsQuery(NeedleOperationDetailsQueryParms.value)
  if (result.list.length !== 0) {
    NeedleOperationDetailsTableDate.value = result.list.map((item: any) => {
      if (PunchingUnitPriceFileStyle.value !== 'Y') {
        item.disableConfirm = true
        item.change = 'Y'
      }
      return item
    })
    summaryData1.value[0].num = result.count
  }

  isLoading3.value = false
}

// 检核取消检核

const LeadNeedleOperationMethods = async (file: any) => {
  const result = await LeadNeedleOperation(styleL.value, colorL.value, file)
  if (result.code === 200) {
    SelectColorQueryMethods()
    JMessage.success(result.message)
  } else {
    JMessage.error(result.message)
  }
}

const findClicked = (row: string) => {
  switch (row) {
    case '检核': {
      CounterCheckParms.value = 0
      CounterCheckMethods()
      break
    }
    case '复制型体工序资料': {
      copyStyleMethdos()
      dialogVisible1.value = true
      break
    }
    case '打勾工序复制': {
      if (copyStyle1List.value.length === 0) {
        JMessage.warning('请先勾选针车工序')
      } else {
        copyStyleMethdos1()
        dialogVisible13.value = true
      }

      break
    }
    case '取消检核': {
      CounterCheckParms.value = 1
      CounterCheckMethods()
      break
    }
    case '未导型体颜色查询': {
      dialogVisible10.value = true
      UnguidedBodyColorQueryMethods()
      break
    }
    case '删除型体颜色资料': {
      handleCloseMateriaLKlc7()
      break
    }
    case '整个型体删除': {
      handleCloseMateriaLKlc1()
      break
    }
    case '导入针车工序': {
      // handleCloseMateriaLKlc1()
      if (styleL.value === '' || colorL.value === '') {
        JMessage.warning('型体和颜色不能为空')
        return
      }
      upload()
      break
    }
  }
}

const uploadFile = async (file?: any) => {
  const formData = new FormData()
  formData.append('file', file)

  try {
    const response = await fetch('/api/upload', {
      method: 'get',
      body: formData
    })

    const data = await response.json()

    if (data.success) {
      console.log('上传成功')
    } else {
      console.error('上传失败')
    }
  } catch (error) {
    console.error('上传出错')
  }
}

const CounterCheckParms = ref()

const CounterCheckParms1 = ref()

const clicktogetdata2 = (row: any) => {
  CounterCheckParms1.value = row
  PunchingUnitPriceFileStyle.value = row.cfmFlag
  NeedleOperationDetailsQueryParms.value.cfmFlag = row.cfmFlag
  NeedleOperationDetailsQueryParms.value.styleColor = row.styleColor
  NeedleOperationDetailsQueryParms.value.styleNo = row.styleNo
  NeedleOperationDetailsQueryMethods()

  tableDataParms.value.color = encodeURIComponent(row.styleColor);
  DeleteTheTypeColorParms.value.cfmFlag = row.cfmFlag
  DeleteTheTypeColorParms.value.styleColor = row.styleColor
  DeleteTheTypeColorParms.value.styleNo = row.styleNo
  formList11.value[1].inputValue = row.styleColor
  deleteDeleteOperationNameParms.value.color = row.styleColor
  SaveChangesParms.value.color = row.styleColor
}

const CounterCheckMethods = async () => {
  if (CounterCheckParms1.value === undefined) {
    JMessage.warning('请选择需要审核的数据')
  } else {
    const result = await CounterCheck(CounterCheckParms.value, CounterCheckParms1.value)
    if (result.code === 200) {
      SelectColorQueryMethods()
      CounterCheckParms1.value = undefined
      JMessage.success(result.message)
    } else {
      JMessage.error(result.message)
    }
  }
}

// 选择颜色查询
const styleNoList = ref('')

const isLoading2 = ref(true)

const SelectColorQueryTableDate = ref([])

const clicktogetdata1 = (row: any) => {
  styleNoList.value = row.styleNo
  tableDataParms.value.style = row.styleNo
  SelectColorQueryMethods()
  TheWholeBodyIsDeletedParms.value = row.styleNo
  formList11.value[0].inputValue = row.styleNo
  deleteDeleteOperationNameParms.value.style = row.styleNo
  SaveChangesParms.value.style = row.styleNo
}

const EvaluatesTheArrayReturnValue = (ArrayList: any) => {
  return ArrayList.map((item: any, index: any) => {
    return {
      optionKey: index,
      optionValue: item,
      optionLabel: item
    }
  })
}

const SelectColorQueryMethods = async () => {
  isLoading2.value = true
  const result = await SelectColorQuery(styleNoList.value)
  SelectColorQueryTableDate.value = result.map((item: any) => {
    if (item.cfmFlag === 'Y') {
      item.backgroundColor = '#84FC04'
    }

    return item
  })
  imgList.value = result.map((item: any) => {
    return item.photoPath
  })
  if (result.length !== 0) {
    NeedleOperationDetailsQueryParms.value.cfmFlag = result[0].cfmFlag
    NeedleOperationDetailsQueryParms.value.styleColor = result[0].styleColor
    NeedleOperationDetailsQueryParms.value.styleNo = result[0].styleNo
    PunchingUnitPriceFileStyle.value = result[0].cfmFlag
    tableDataParms.value.color = encodeURIComponent(result[0].styleColor);
    formList11.value[1].inputValue = result[0].styleColor
    deleteDeleteOperationNameParms.value.color = result[0].styleColor
    SaveChangesParms.value.color = result[0].styleColor
    NeedleOperationDetailsQueryMethods()
  }
  isLoading2.value = false
}

// 选择型体查询
const SelectTypeQueryParms = ref({
  color: '',
  cutTool: '',
  pageNum: 1,
  pageSize: 40,
  styleNo: ''
})

const Launchform5 = (row: any) => {
  SelectTypeQueryParms.value.cutTool = row[1].inputValue
  SelectTypeQueryParms.value.styleNo = row[0].inputValue
  SelectTypeQueryMethods()
}

const isLoading1 = ref(false)

const SelectTypeQueryTableDate = ref([])

const tableDataParms = ref({
  style: '',
  color: ''
})

const SelectTypeQueryMethods = async () => {
  isLoading1.value = true
  const result = await SelectTypeQuery(SelectTypeQueryParms.value)
  SelectTypeQueryTableDate.value = result.cutToolList
  if (result.cutToolList.length !== 0) {
    styleNoList.value = result.cutToolList[0].styleNo
    tableDataParms.value.style = result.cutToolList[0].styleNo
    formList11.value[0].inputValue = result.cutToolList[0].styleNo
    deleteDeleteOperationNameParms.value.style = result.cutToolList[0].styleNo
    SaveChangesParms.value.style = result.cutToolList[0].styleNo
    SelectColorQueryMethods()
  }
  totalL.value = result.total
  isLoading1.value = false
}

const totalL = ref(0)

const pageChangeL = (val: any) => {
  SelectTypeQueryParms.value.pageNum = val
  SelectTypeQueryMethods()
}

const pageSizeChangeL = (val: any) => {
  SelectTypeQueryParms.value.pageSize = val
  SelectTypeQueryMethods()
}

onMounted(() => {
  SelectTypeQueryMethods()
})

const formList11 = ref([
  {
    type: 'input1',
    inputPlaceholder: '型体',
    inputValue: '',
    inputLabel: '',
    inputDisabled: true
  },
  {
    type: 'input1',
    inputPlaceholder: '颜色',
    inputValue: '',
    inputLabel: '',
    inputDisabled: true
  }
])

const formList = ref([
  {
    type: 'input',
    inputPlaceholder: '请输入型体',
    inputValue: '',
    inputLabel: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入冲刀号',
    inputValue: '',
    inputLabel: ''
  }
])

const formList1 = ref([
  {
    type: 'input',
    inputPlaceholder: '请输入型体',
    inputValue: '',
    inputLabel: '',
    inputWidth: '90px'
  },
  {
    type: 'input',
    inputPlaceholder: '请输入颜色',
    inputValue: '',
    inputLabel: '',
    inputWidth: '90px'
  },
  {
    type: 'button',
    checkboxLabel: '检核'
  },
  {
    type: 'button',
    checkboxLabel: '取消检核'
  },
  {
    type: 'button',
    checkboxLabel: '导入针车工序'
  },
  {
    type: 'button',
    checkboxLabel: '复制型体工序资料'
  },
  {
    type: 'button',
    checkboxLabel: '打勾工序复制'
  },
  {
    type: 'button',
    checkboxLabel: '整个型体删除'
  },
  {
    type: 'button',
    checkboxLabel: '删除型体颜色资料'
  },
  {
    type: 'button',
    checkboxLabel: '未导型体颜色查询'
  }
])

const tableHeader = ref([
  {
    label: '型体',
    prop: 'styleNo'
  }
])

const imgList = ref([])

const tableHeader2 = ref([
  {
    label: '颜色',
    prop: 'styleColor',
    backgroundColor: true
  },
  {
    label: '颜色代号',
    prop: 'colorCode'
  },
  {
    type: 'img',
    label: '图片',
    fixed: true,
    prop: 'photoPath',
    srcList: imgList
  }
])

const tableHeader10 = ref([
  {
    label: '型体',
    prop: 'styleNo'
  },
  {
    label: '冲刀号',
    prop: 'photoPath'
  },
  {
    label: '颜色',
    prop: 'styleColor'
  },
  {
    label: '颜色代号',
    prop: 'colorCode'
  }
])

const tableHeader11 = ref([
  {
    label: '型体',
    prop: 'style'
  },
  {
    label: '颜色',
    prop: 'color'
  },
  {
    label: '颜色代号',
    prop: 'styleColor'
  }
])

const tableHeader3 = ref([
  {
    label: '序号',
    prop: 'seqNo',
    change: true
  },
  {
    label: '作业流程',
    prop: 'processName'
  },
  {
    label: '单价',
    prop: 'price'
  },
  {
    label: '备注',
    prop: 'remark'
  }
])
</script>

<style lang="less" scoped>
:deep(.el-table .el-table__footer-wrapper) {
  --el-table-row-hover-bg-color: rgb(128, 255, 0);
}
</style>
